#pragma once
#include "Shapes2D/Point2D.h"
#include "Img.h"

class Point2D;

class Sprite
{
private:
    Img **subimage;
    int index,subimageCount;
    void resize();
public:
    Point2D origin;
    Sprite();
    ~Sprite();
    Sprite& add(Img *newTextureId);
    Sprite& add(const char *fn);
    Sprite& extend(Sprite &s);
    Sprite& operator+=(Img* newTextureId);
    Sprite& operator+=(const char *fn);
    Sprite& operator+=(Sprite s);
    int subimages();
    Sprite& setIndex(int newIndex);
    int getIndex();
    Img* tex(int pos);
    double drawW(Point2D &position, double depth, double widthSize);
	double drawH(Point2D &position, double depth, double heightSize);
    Sprite& duplicate(Sprite &spr);
    Sprite& operator=(Sprite &spr);
};